<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('attraction_tags', function (Blueprint $table) {
            $table->comment('景点标签表');
            $table->bigIncrements('id');
            $table->string('name', 64)->nullable(false)->comment('标签名称');
            $table->unique(['name'], 'name_index');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('attraction_tags');
    }
};
